<template>
  <div class="detail-params" v-if="Object.keys(itemParams).length">
    <table class="rule" v-for="(table,index) in itemParams.rule.tables" :key="index">
      <tr v-for="(item,indey) in table" :key="indey">
        <td v-for="(tdValue,indez) in item" :key="indez">{{ tdValue }}</td>
      </tr>
    </table>
    <table class="info">
      <tr v-for="(item,index) in itemParams.info.set" :key="index">
        <td class="key">{{ item.key }}</td>
        <td class="value">{{ item.value }}</td>
      </tr>
    </table>
  </div>
</template>

<script>
export default {
  name: "DetailParams",
  props: {
    itemParams: {
      type: Object,
      default() {
        return {};
      }
    },
  }
}
</script>

<style scoped>
.detail-params {
  padding: 20px 10px;
  border-bottom: 5px solid #f2f5f8;
}

.detail-params table {
  width: 100%;
  font-size: var(--font-size);
}

.detail-params table tr td {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.detail-params .info tr .key {
  min-width: 100px;
}

.detail-params .info tr .value {
  color: #f13e3a;
}
</style>